<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Log extends MY_Controller {

	public function __construct()
	{
		parent::__construct();	
	}
	
	function index()
	{
		$this->load->view('admin/log/main');
	}
	
	function get_info()
	{
		$this->db->select('bf_activities.*, user.id, user.first_name, user.last_name');
		$this->db->from('bf_activities,user');
		$this->db->where('bf_activities.deleted',0);
			$where = 'user.id = bf_activities.user_id';
		$this->db->where($where);
		$this->db->order_by("created_on", "desc"); 
		$q = $this->db->get();
		
		//die($this->db->last_query());
		die(json_encode($q->result()));
	}
	

}